/**
 * Copyright © 2011 looty
 * @link http://www.looty.org
 * @link http://code.google.com/p/looty/
 * @author lab9 - Bertrand Larrieu
 * @mail lab9.fr@gmail.com
 * @version 2.0
 */

package org.looty.data 
{
	import org.looty.core.disposable.*;

	public class Callback implements IDisposable 
	{
		
		private var _params		:Array;
		private var _callback	:Function;
		
		public function Callback() 
		{
			
		}
		
		public function execute():void
		{
			if (_callback != null) _callback.apply(null, _params);
		}
		
		public function dispose():void 
		{
			
		}
		
		public function get params():Array 
		{
			return _params;
		}
		
		public function set params(value:Array):void 
		{
			_params = value;
		}
		
		public function get callback():Function 
		{
			return _callback;
		}
		
		public function set callback(value:Function):void 
		{
			_callback = value;
		}
		
	}

}